import Vue from "vue";

import dateFormatter from "./utils/date-formatter";

import App from "./App.vue";
import router from "./router";
import store from "./store";

import HttpPlugin from "./common/http";

import {
  Button,
  Select,
  Empty,
  Input,
  Form,
  FormItem,
  Option,
  Table,
  TableColumn,
  Pagination,
  Loading,
} from "element-ui";

Vue.config.productionTip = false;

Vue.use(HttpPlugin, { baseURL: "/a" });

// 自定义过滤器
Vue.filter("date", dateFormatter);

Vue.use(Button);
Vue.use(Input);
Vue.use(Select);
Vue.use(Option);
Vue.use(Empty);
Vue.use(Form);
Vue.use(FormItem);
Vue.use(Table);
Vue.use(TableColumn);
Vue.use(Pagination);
Vue.use(Loading);

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
